<template>
  <div class="container-header-margin">
    <a-button type="primary" @click="toLogin"> 项目申报 </a-button>
  </div>
</template>
      
      <script setup>
const toLogin = () => {
  const router = useRouter();
  router.push({ path: "/login" });
};

async function startStream() {
    const output = document.getElementById('output');
    const response = await fetch('/stream');
    const reader = response.body.getReader();
    const decoder = new TextDecoder();

    while (true) {
        const { value, done } = await reader.read();
        if (done) break;
        const text = decoder.decode(value);
        output.textContent += text; // 直接保留换行符
    }
}
</script>
      
      <style lang="less" scoped>
</style>
      